﻿using mozhi.smarterp.Business.Common;
using mozhi.smarterp.Business.Enums;
using System;
using System.Collections.Generic;
using System.Text;
using Volo.Abp.Application.Dtos;

namespace mozhi.smarterp.Business.Purchases.Requisition
{
    public class PurchaseRequisitionDto : DocumentHeaderDto
    {
        /// <summary>
        /// 产品类型
        /// </summary>
        public ProductType ProductType { get; set; }

        public decimal TotalQuantity { get; set; }

        public decimal? OrderQuantity { get; set; }

        public decimal RemainingQuantity { get; set; }

        /// <summary>
        /// 申请人
        /// </summary>
        public Guid? ApplicantId { get; set; }

        public string ApplicantName { get; set; }

        public List<PurchaseRequisitionItemDto> Items { get; set; }
    }

    public class PurchaseRequisitionItemDto : DocumentBodyDto
    {
        /// <summary>
        /// 申请单位
        /// </summary>
        public Guid RequisitionUnitId { get; set; }

        public string RequisitionUnitName { get; set; }

        /// <summary>
        /// 申请数量
        /// </summary>
        public decimal RequisitionQuantity { get; set; }

        /// <summary>
        /// 批准数量
        /// </summary>
        public decimal? ApprovedQuantity { get; set; }

        /// <summary>
        ///要货日期
        /// </summary>
        public DateTime? RequiredDate { get; set; }

        /// <summary>
        /// 建议供应商
        /// </summary>
        public Guid? SuggestedSupplierId { get; set; }

        public string SuggestedSupplierName { get; set; }
    }
}
